home *** CD-ROM | disk | FTP | other *** search
-
- AUTHOR: Timothy J. Luoma <luomat@capitalist.princeton.edu>
-
- DATE: 14 March 1996
-
- WARNING: USE ENTIRELY AT YOUR OWN RISK
-
- TESTED UNDER: NeXTStep 3.2 on my NeXTStation (owners of other
- architectures, please see note below: OTHER ARCHS)
-
-
- Now that we've gotten that out of the way, let's talk.
-
- TABLE OF CONTENTS:
- This is a very small collection of 3 /bin/sh scripts
- which are designed to manipulate disks from the
- command line.
-
- eject.sh - eject disks (floppy or CD)
- ff - format floppy disks (FLOPPY ONLY)
- mntdisk - mount disks (floppy or CD)
-
- NONE OF THESE SCRIPTS HAVE BEEN TESTED WITH Optical
- Disks, Jazz Disks, Zip Disks, or any other kind of
- Disk besides 3.5" disks and CD-ROMs.
-
- NOTE:
- All of these scripts are designed to work
- only when run as root. To get around that
- you'd have to change the permissions to the
- following commands: mount, umount, disk,
- /usr/filesystems/DOS.fs/DOS.util, and
- /usr/filesystems/mac.fs/mac.util
-
- HISTORY:
- I got tired of having to refer to the 'disk',
- 'mount/umount', and 'fstab' man pages every time
- I wanted to eject a disk, or format a disk, or
- mount a disk manually. This was made more difficult
- by the fact that it seems like two different devices
- are used for both NeXT floppy disks and others
- (either /dev/fd0a or /dev/rfd0b, respectively),
- and for NeXT CDs and other types of CDs (/dev/sd2a
- or /dev/rsd2h). When you 'mount' you don't use
- the raw device, and when you use 'disk -e' you do,
- except sometimes, etc etc etc. If the 'umount'
- fails and you do 'disk -e' then you can really
- screw things up...
-
- Well, these scripts try to take the guess work out
- of all that.
-
- 'ff' and 'mntdisk' can be run in either LINE MODE
- (in case you know the format of the information
- they want) or INTERACTIVE MODE (in case you don't).
-
- 'eject.sh' just needs the name of the mountpoint
- (ie if you have a disk named '/mydisk', then use:
- 'eject.sh /mydisk')
-
- YOU REALLY SHOULD read through the code to each of
- the scripts... I've tried to be thorough in my
- comments. If you don't understand something, then
- please ask. I've caused a few panics on my machine
- using these scripts, and taken that knowledge and
- tried to build in safety checks to the scripts.
-
- EJECT.SH:
- Observant 'netwatchers will know that 'eject.sh'
- has been previously released. This is not a new
- version, but I include it because I think it is
- useful, especially when dealing with a bug in
- 'mntdisk' where the disk shows up in the File Viewer
- but the 'Disk->Eject' menu is still grey (if anyone
- figures out why that happens occasionally, please
- let me know). Feel free to rename it 'eject' if
- you don't already have an 'eject' somewhere on your
- NeXTStep machine. I am aware that there are several
- binaries out there by the name 'eject' so I wanted
- to differentiate this one by indicating that it is
- a /bin/sh script.
-
- OTHER ARCHS:
- I've never used any other NeXTStep machine than
- the NeXTStation for more than a few minutes. I
- don't know what 'disk -e' does on those machines
- (on my NeXTStation it causes the disk to be ejected,
- hopefully after the 'umount' command has been
- invoked). Please be careful with these scripts.
- If someone were to tell me what 'disk -e' does,
- I'd appreciate it (my guess is that it depends on
- what type of disk drive you have).
-
- "TERMS OF AGREEMENT":
- I really don't want any $ or anything else for
- these. I wrote them for me, and thought others
- might find them useful. I just ask that if you
- use them, you let me know. If you want to
- update/revise/distribute them, please feel free.
- All I ask/require is that you keep track of your
- updates (so I know what has changed since I released
- them) and let me know of any changes you make. If
- you are going to include them as part of some
- collection, great! Please let me know that too.
- If you use them and find them helpful, please drop
- me a note. I promise it will make my day.
-
- FINAL WORDS:
- Please remember these are basically hacks. If you
- don't do what they expect as they expect them, they
- won't work. Hopefully I've been smart enough to
- have them quit before doing any damage, but I cannot
- possible be expected to know how someone else is
- going to wrongly use these scripts. They are
- commented on extensively; 2 of them have interactive
- modes to guide you, and the other is ridiculously
- simple to use. But my mission in my (computer)
- life is to find simple solutions to complex problems
- while making things as easy for myself as possible.
- I'd rather write these scripts once and never again
- have to remember how to correctly manually
- mount/eject/format, because I believe that we have
- a limited amount of memory we can use. The more
- memory we can free up by not having to remember
- such picayune drivel as correct syntax for UNIX
- commands, the better off we as a planet will be.
-
- <end>
-